package com.example.xm.model.OwnApi;

import com.example.xm.bean.OwnBean.UserBean;
import com.example.xm.bean.OwnBean.UserUpdateBean;

import org.intellij.lang.annotations.Flow;

import java.util.Map;

import io.reactivex.Flowable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.HEAD;
import retrofit2.http.Header;
import retrofit2.http.POST;

public interface UserApi {

    //登录
    @POST("user/login")
    @FormUrlEncoded
    Flowable<UserBean> login(@FieldMap Map<String, String> map);

    //注册
    @POST("user/register")
    @FormUrlEncoded
    Flowable<UserBean> register(@FieldMap Map<String,String> map);

    //更新用户信息
    @POST("user/updateinfo")
    @FormUrlEncoded
    Flowable<UserUpdateBean> updateUserInfo(@Header("x-token") String token, @FieldMap Map<String, String> map);
}
